package com.hhkj.api.question.controller;

import com.hhkj.api.common.session.holder.model.LoginStudent;
import com.hhkj.api.question.biz.ApiProblemFeedbackBizService;
import com.hhkj.api.question.model.req.ApiProblemFeedbackSaveReq;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.valid.VAdd;
import com.ruoyi.framework.login.api.ApiLogin;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/** 问题反馈
 * @Author luowu
 * @Date 2024/8/9 涵 14:27:45
 */
@RestController
@RequestMapping("/api/problem")
public class ApiProblemFeedbackController {

    @Resource
    private ApiProblemFeedbackBizService apiProblemFeedbackBizService;

    /**
     * 保存问题反馈
     * @return
     */
    @ApiLogin(LoginStudent.class)
    @PostMapping("/feedback/save")
    public AjaxResult save(@RequestBody @Validated(VAdd.class) ApiProblemFeedbackSaveReq req) {
        return AjaxResult.success(apiProblemFeedbackBizService.save(req));
    }
}
